<?php
switch ($_REQUEST['sAction'])
{
	case 'jobgroup-delete':
		$iResult = JobgroupHandler::delJobgroup($_REQUEST['iJobgroup']);
		if ($iResult == 1) {
			header('Location: index.php?sView=job-jobgrouplist');
			exit();
		}
		break;
	case 'jobgroup-change':
		$iResult = JobgroupHandler::changeJobgroup($_REQUEST['iJobgroup'], $_REQUEST['sName']);
		if ($iResult == 1) {
			header('Location: index.php?sView=job-jobgrouplist');
			exit();
		}
		break;
	case 'jobgroup-add':
		$iResult = JobgroupHandler::addJobgroup($_REQUEST['sName']);
		if ($iResult > 0) {
			header('Location: index.php?sView=job-jobgrouplist');
			exit();
		}
		break;
}
